import request from '@/utils/request'

// 查询仓位网格列表
export function listGrid(query) {
  return request({
    url: '/locates/grid/list',
    method: 'get',
    params: query
  })
}

// 查询仓位网格详细
export function getGrid(gridId) {
  return request({
    url: '/locates/grid/' + gridId,
    method: 'get'
  })
}

// 新增仓位网格
export function addGrid(data) {
  return request({
    url: '/locates/grid',
    method: 'post',
    data: data
  })
}

// 修改仓位网格
export function updateGrid(data) {
  return request({
    url: '/locates/grid',
    method: 'put',
    data: data
  })
}

// 删除仓位网格
export function delGrid(gridId) {
  return request({
    url: '/locates/grid/' + gridId,
    method: 'delete'
  })
}

// 查询仓位网格详细
export function getMapGrid(parentId) {
  return request({
    url: '/locates/grid/data/' + parentId,
    method: 'get'
  })
}
